package com.supermarket.service.impl;

import com.supermarket.entity.Repair;
import com.supermarket.mapper.RepairMapper;
import com.supermarket.service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RepairServiceImpl implements RepairService {

    @Autowired//自动装配给repairService
    private RepairMapper repairMapper;

    @Override
    public List<Repair> findAll() {
        return repairMapper.findAll();
    }

    @Override
    public void add(Repair repair) {
        repairMapper.add(repair);
    }

    @Override
    public void deleteById(String repairID) {
        repairMapper.deleteById(repairID);
    }

    @Override
    public void updateRepair(Repair repair) {
        repairMapper.updateRepair(repair);
    }

}
